package texture;

import java.lang.reflect.Type;

import com.google.gson.JsonDeserializationContext;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;

public class TextureMetadataSectionSerializer extends BaseMetadataSectionSerializer<TextureMetadataSection> {
	public String getSectionName() {
		return "texture";
	}

	public TextureMetadataSection deserialize(JsonElement jsonElement, Type par2Type, JsonDeserializationContext jsonDeserializationContext) {
		JsonObject jsonobject = jsonElement.getAsJsonObject();
		boolean isBlur = this.getBooleanFromJsonElement(jsonobject.get("blur"), "blur", Boolean.valueOf(false));
		boolean isClamp = this.getBooleanFromJsonElement(jsonobject.get("clamp"), "clamp", Boolean.valueOf(false));
		return new TextureMetadataSection(isBlur, isClamp);
	}
}
